package com.epam.lunch.service;

import com.epam.lunch.domain.Order;
import com.epam.lunch.domain.OrderItem;

public class OrderBuilder {
	private Order order = new Order();

	public OrderBuilder setPerson(String person) {
		order.setPerson(person);
		return this;
	}
	public OrderBuilder addItem(long foodId, int quantity) {
		//order.getItems().add(new OrderItem(foodId, quantity));
		//return this;

		throw new RuntimeException("orderItem.foodId is reworked as orderItem.food");
	}
	public Order build() {
		return this.order;
	}
}
